/*
 Navicat Premium Data Transfer

 Source Server         : Service
 Source Server Type    : MySQL
 Source Server Version : 80036
 Source Host           : 146.56.233.239:3306
 Source Schema         : likusystem

 Target Server Type    : MySQL
 Target Server Version : 80036
 File Encoding         : 65001

 Date: 21/08/2024 10:54:16
*/

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Positions]') AND type in (N'U')) DROP TABLE [dbo].[Positions];
CREATE TABLE [dbo].[Positions](
    Id INT IDENTITY(1,1),
    warehouse_id VARCHAR(50),
    position_id VARCHAR(50),
    is_material INT,
    storey INT,
    grid INT,
    tray INT,
    material_number INT,
    status INT,
    des VARCHAR(255),
    create_time DATETIME,
    update_time DATETIME,
    create_by VARCHAR(50),
    update_by VARCHAR(50),
    is_deleted INT,
    spareF VARCHAR(255),
    spareS VARCHAR(255),
    spareT VARCHAR(255),
    PRIMARY KEY (Id)
);

EXEC sp_addextendedproperty 'MS_Description', '库位', 'SCHEMA', dbo, 'table', Positions, null, null;
EXEC sp_addextendedproperty 'MS_Description', '主键Id', 'SCHEMA', dbo, 'table', Positions, 'column', Id;
EXEC sp_addextendedproperty 'MS_Description', '仓库id', 'SCHEMA', dbo, 'table', Positions, 'column', warehouse_id;
EXEC sp_addextendedproperty 'MS_Description', '库位id', 'SCHEMA', dbo, 'table', Positions, 'column', position_id;
EXEC sp_addextendedproperty 'MS_Description', '有件无件', 'SCHEMA', dbo, 'table', Positions, 'column', is_material;
EXEC sp_addextendedproperty 'MS_Description', '列', 'SCHEMA', dbo, 'table', Positions, 'column', storey;
EXEC sp_addextendedproperty 'MS_Description', '层', 'SCHEMA', dbo, 'table', Positions, 'column', grid;
EXEC sp_addextendedproperty 'MS_Description', '托盘类型', 'SCHEMA', dbo, 'table', Positions, 'column', tray;
EXEC sp_addextendedproperty 'MS_Description', '库存数量', 'SCHEMA', dbo, 'table', Positions, 'column', material_number;
EXEC sp_addextendedproperty 'MS_Description', '状态', 'SCHEMA', dbo, 'table', Positions, 'column', status;
EXEC sp_addextendedproperty 'MS_Description', '备注', 'SCHEMA', dbo, 'table', Positions, 'column', des;
EXEC sp_addextendedproperty 'MS_Description', '创建时间', 'SCHEMA', dbo, 'table', Positions, 'column', create_time;
EXEC sp_addextendedproperty 'MS_Description', '修改时间', 'SCHEMA', dbo, 'table', Positions, 'column', update_time;
EXEC sp_addextendedproperty 'MS_Description', '创建人', 'SCHEMA', dbo, 'table', Positions, 'column', create_by;
EXEC sp_addextendedproperty 'MS_Description', '修改人', 'SCHEMA', dbo, 'table', Positions, 'column', update_by;
EXEC sp_addextendedproperty 'MS_Description', '软删除', 'SCHEMA', dbo, 'table', Positions, 'column', is_deleted;
EXEC sp_addextendedproperty 'MS_Description', '', 'SCHEMA', dbo, 'table', Positions, 'column', spareF;
EXEC sp_addextendedproperty 'MS_Description', '', 'SCHEMA', dbo, 'table', Positions, 'column', spareS;
EXEC sp_addextendedproperty 'MS_Description', '', 'SCHEMA', dbo, 'table', Positions, 'column', spareT;


-- ----------------------------
-- Records of positions
-- ----------------------------
INSERT INTO  positions  VALUES ( 'W1', 'P1', 0, 1, 1, 1, NULL, 0, NULL, '2024-08-19 16:42:57', '2024-08-19 16:10:34', NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P2', 0, 1, 2, 1, NULL, 0, NULL, '2024-08-19 16:35:24', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P3', 0, 1, 3, 0, NULL, 0, NULL, '2024-08-19 16:35:18', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P4', 0, 1, 4, 1, NULL, 0, NULL, '2024-08-19 16:36:42', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P5', 0, 1, 5, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P6', 0, 2, 1, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P7', 0, 2, 2, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P8', 0, 2, 3, NULL, NULL, 0, NULL, '2024-08-20 14:22:01', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P9', 0, 2, 4, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P10', 0, 2, 5, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P11', 0, 3, 1, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P12', 0, 3, 2, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P13', 0, 3, 3, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P14', 0, 3, 4, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P15', 0, 3, 5, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P16', 0, 4, 1, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P17', 0, 4, 2, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P18', 0, 4, 3, NULL, NULL, 0, NULL, '2024-08-19 16:42:01', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P19', 0, 4, 4, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W1', 'P20', 0, 4, 5, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

INSERT INTO  positions  VALUES ( 'W2', 'P21', 0, 1, 1, 1, NULL, 0, NULL, '2024-08-19 16:42:57', '2024-08-19 16:10:34', NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P22', 0, 1, 2, 1, NULL, 0, NULL, '2024-08-19 16:35:24', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P23', 0, 1, 3, 0, NULL, 0, NULL, '2024-08-19 16:35:18', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P24', 0, 1, 4, 1, NULL, 0, NULL, '2024-08-19 16:36:42', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P25', 0, 1, 5, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P26', 0, 2, 1, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P27', 0, 2, 2, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P28', 0, 2, 3, NULL, NULL, 0, NULL, '2024-08-20 14:22:01', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P29', 0, 2, 4, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P30', 0, 2, 5, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P31', 0, 3, 1, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P32', 0, 3, 2, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P33', 0, 3, 3, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P34', 0, 3, 4, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P35', 0, 3, 5, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P36', 0, 4, 1, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P37', 0, 4, 2, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P38', 0, 4, 3, NULL, NULL, 0, NULL, '2024-08-19 16:42:01', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P39', 0, 4, 4, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO  positions  VALUES ( 'W2', 'P40', 0, 4, 5, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);



